program fread
implicit none
integer :: fileHandle1 = 21, fileHandle2 = 22
double precision :: d1, d2
integer :: num

open( unit = fileHandle1, file = "testwrite_data.dat", form = "unformatted", &
  status = "old", access = "direct", recl = 8 )
open( unit = fileHandle2, file = "testwrite_num.dat", form = "unformatted", &
  status = "old", access = "direct", recl = 4 )

read( fileHandle1, rec = 1 ) d1
read( fileHandle1, rec = 2 ) d2
read( fileHandle2, rec = 1 ) num 

write(*,*) d1, d2, num
close(fileHandle1)
close(fileHandle2)
end program


